<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    // Browser environment sniffing
    var inBrowser = typeof window !== 'undefined';
    var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
    var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
    var UA = inBrowser && window.navigator.userAgent.toLowerCase();
    var isIE = UA && /msie|trident/.test(UA);
    var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
    var isEdge = UA && UA.indexOf('edge/') > 0;
    var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
    var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
    var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
    var isPhantomJS = UA && /phantomjs/.test(UA);
    var isFF = UA && UA.match(/firefox\/(\d+)/);
    console.log(inBrowser,'inBrowser')
    console.log(inWeex,'inWeex')
    console.log(weexPlatform,'weexPlatform')
    console.log(UA,'UA')
    console.log(isIE,'isIE')
    console.log(isIE9,'isIE9')
    console.log(isEdge,'isEdge')
    console.log(isAndroid,'isAndroid')
    console.log(isIOS,'isIOS')
    console.log(isChrome,'isChrome')
    console.log(isPhantomJS,'isPhantomJS')
    console.log(isFF,'isFF')
</script>
</body>
</html>
